package com.qijian.maindata.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qijian.maindata.domain.ExamineSchemeDetails;
import com.qijian.maindata.domain.query.ExamineSchemeDetailsQuery;
import com.qijian.maindata.domain.vo.ExamineSchemeDetailsVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 检验方案明细Mapper接口
 *
 * @author qijian
 * @date 2021-11-24
 */
public interface ExamineSchemeDetailsMapper extends BaseMapper<ExamineSchemeDetails> {

    @Select("select count(0)+IF(#{isAddOne},1,0) from main_examine_scheme_details WHERE create_time >= CURRENT_DATE ")
    int countCurrentDateWithDel(boolean isAddOne);

    Page<ExamineSchemeDetailsVo> selectPageVo(Page<ExamineSchemeDetails> page, @Param(Constants.WRAPPER) Wrapper<ExamineSchemeDetailsQuery> queryWrapper);

    List<ExamineSchemeDetailsVo> selectPageVo(@Param(Constants.WRAPPER) Wrapper<ExamineSchemeDetailsQuery> queryWrapper);
}
